package com.dodo.blog.server;

import com.dodo.blog.model.Playground;
import com.dodo.blog.request.BasicRequest;

import java.util.List;

/**
 * @author <a href="mailto:pohorelec@comvai.com">Jozef Pohorelec</a>
 */
public interface PlaygroundService
{
    /**
     * Return list of {@link com.dodo.blog.model.Playground}
     *
     * @param request contains ordering and result properties
     * @return list of {@link com.dodo.blog.model.Playground}
     */
    List<Playground> getPlaygroundList( BasicRequest request );

    /**
     * Save playground to datastore
     *
     * @param playground {@link com.dodo.blog.model.Playground} entity to save
     */
    void savePlayground( Playground playground );

    /**
     * Get playground by id
     *
     * @param id id of {@link com.dodo.blog.model.Playground} entity
     * @return playground by id
     */
    Playground getPlaygroundById( Long id );

    /**
     * Delete playground from datastore
     *
     * @param id id of {@link com.dodo.blog.model.Playground} entity to delete
     */
    void deletePlayground( Long id );
}
